<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">




<script>
    (function(){
        if(''){
            if (prompt('请输入文章密码') !== ''){
                alert('密码错误！');
                history.back();
            }
        }
    })();
  </script>






<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />



  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico?v=5.1.4">







  <meta name="keywords" content="Swift," />





  <link rel="alternate" href="/atom.xml" title="Swift社区" type="application/atom+xml" />






<meta name="description" content="前言本期是 Swift 编辑组自主整理周报的第十三期，每个模块已初步成型。各位读者如果有好的提议，欢迎在文末留言。 Swift 周报在 GitHub 开源，欢迎提交 issue，投稿或推荐内容。目前计划每两周周一发布，欢迎志同道合的朋友一起加入周报整理。 渺小不可怕，可怕的是比你优秀的强者还比你更加努力。Swift社区不会辜负每一位努力的勇士，优秀终将与你不期而遇！👊👊👊  周报精选 新闻和">
<meta name="keywords" content="Swift">
<meta property="og:type" content="article">
<meta property="og:title" content="Swift 周报 第二十二期">
<meta property="og:url" content="https://fanbaoying.github.io/Swift-周报-第二十二期/index.html">
<meta property="og:site_name" content="Swift社区">
<meta property="og:description" content="前言本期是 Swift 编辑组自主整理周报的第十三期，每个模块已初步成型。各位读者如果有好的提议，欢迎在文末留言。 Swift 周报在 GitHub 开源，欢迎提交 issue，投稿或推荐内容。目前计划每两周周一发布，欢迎志同道合的朋友一起加入周报整理。 渺小不可怕，可怕的是比你优秀的强者还比你更加努力。Swift社区不会辜负每一位努力的勇士，优秀终将与你不期而遇！👊👊👊  周报精选 新闻和">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://devimages-cdn.apple.com/wwdc-services/articles/images/5A13BEF0-31D6-466B-B88B-8484635BEA2A/2048.jpeg">
<meta property="og:image" content="https://user-images.githubusercontent.com/24238160/132703149-34121c6c-fd18-491c-a697-58a0fabf3060.png">
<meta property="og:updated_time" content="2023-07-04T07:25:41.314Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Swift 周报 第二十二期">
<meta name="twitter:description" content="前言本期是 Swift 编辑组自主整理周报的第十三期，每个模块已初步成型。各位读者如果有好的提议，欢迎在文末留言。 Swift 周报在 GitHub 开源，欢迎提交 issue，投稿或推荐内容。目前计划每两周周一发布，欢迎志同道合的朋友一起加入周报整理。 渺小不可怕，可怕的是比你优秀的强者还比你更加努力。Swift社区不会辜负每一位努力的勇士，优秀终将与你不期而遇！👊👊👊  周报精选 新闻和">
<meta name="twitter:image" content="https://devimages-cdn.apple.com/wwdc-services/articles/images/5A13BEF0-31D6-466B-B88B-8484635BEA2A/2048.jpeg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://fanbaoying.github.io/Swift-周报-第二十二期/"/>





  <title>Swift 周报 第二十二期 | Swift社区</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
    
    <a href="https://github.com/SwiftCommunityRes" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
    
    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Swift社区</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">做最好的 Swift 社区</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://fanbaoying.github.io/Swift-周报-第二十二期/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Swift社区">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="https://avatars.githubusercontent.com/u/84354365?v=4">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Swift社区">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Swift 周报 第二十二期</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2023-07-04T15:19:30+08:00">
                2023-07-04
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Swift-周报/" itemprop="url" rel="index">
                    <span itemprop="name">Swift 周报</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>

                <!-- 
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                -->
                <span title="字数统计">
                  数字统计 2,881字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>

                <!-- 
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                --> 

                <span title="阅读时长">
                  阅读时长 11分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p><strong>本期是 Swift 编辑组自主整理周报的第十三期</strong>，每个模块已初步成型。各位读者如果有好的提议，欢迎在文末留言。</p>
<p>Swift 周报在 <a href="https://github.com/SwiftCommunityRes/SwiftWeekly" title="SwiftWeekly" target="_blank" rel="noopener">GitHub 开源</a>，欢迎提交 issue，投稿或推荐内容。目前计划每两周周一发布，欢迎志同道合的朋友一起加入周报整理。</p>
<p>渺小不可怕，可怕的是比你优秀的强者还比你更加努力。<strong>Swift社区</strong>不会辜负每一位努力的勇士，优秀终将与你不期而遇！👊👊👊</p>
<blockquote>
<p><strong>周报精选</strong></p>
<p>新闻和社区：因iPhone销量下降 苹果利润2016年以来首次低于预期</p>
<p>提案：新年开始多个提案状态发生变化</p>
<p>Swift 论坛：讨论如何设置需要异步初始化的静态变量</p>
</blockquote>
<a id="more"></a>
<h2 id="新闻和社区"><a href="#新闻和社区" class="headerlink" title="新闻和社区"></a>新闻和社区</h2><h3 id="因-iPhone-销量下降，苹果利润-2016-年以来首次低于预期"><a href="#因-iPhone-销量下降，苹果利润-2016-年以来首次低于预期" class="headerlink" title="因 iPhone 销量下降，苹果利润 2016 年以来首次低于预期"></a>因 iPhone 销量下降，苹果利润 2016 年以来首次低于预期</h3><p>2 月 3 日凌晨，多家美股科技巨头公布财报。苹果 2023 财年 Q1 净利润录得 299 亿美元，低于市场预期，原因是 iPhone 的供应出现问题，导致销售疲软。苹果当季销售额下降 5% ，至 1172 亿美元，全球各地的销售额均出现下滑。除服务和 ipad 以外，所有产品类别的销售额都有所下降。这是自 2016 年以来苹果首次未能达到华尔街的利润预期。不过，苹果CEO库克在最新业绩会上表示，中国市场的需求已经有非常好的复苏，去年 12 月和 11 月相比市场确实发生了很大变化。库克还表示，苹果将很快在印度开设第一批零售店。</p>
<h3 id="App-和-App-内购买项目即将实行税率和价格调整"><a href="#App-和-App-内购买项目即将实行税率和价格调整" class="headerlink" title="App 和 App 内购买项目即将实行税率和价格调整"></a>App 和 App 内购买项目即将实行税率和价格调整</h3><p>App Store 的交易和支付机制旨在帮助您在覆盖全球的 175 个国家和地区的商店中，以 45 种货币为您的产品和服务便捷地进行定价与销售。我们会根据税款和外币汇率变化，定期在相关地区的 App Store 更新定价。相关调整将根据金融数据机构提供的公开汇率信息进行，以此确保 App 和 App 内购买内容的定价在所有商店中保持平衡。</p>
<p>2023 年 2 月 13 日起，哥伦比亚、埃及、匈牙利、尼日利亚、挪威、南非和英国 App Store 的 App 及 App 内购买项目 (自动续期订阅除外) 的价格将上调。由于乌兹别克斯坦的增值税率从 15% 下调至 12%，该地区的价格亦将相应下调。您的收益将随之进行调整，并会根据不含税的价格来进行计算。</p>
<p>虽然爱尔兰、卢森堡、新加坡和津巴布韦 App Store 的价格不会改变，但您的收益将进行调整以反映以下税率调整：</p>
<p>爱尔兰：电子报纸和期刊的增值税率从 9% 下调至 0%<br>卢森堡：增值税率从 17% 下调至 16%<br>新加坡：商品和服务税率从 7% 上调至 8%<br>津巴布韦：增值税率从 14.5% 上调至 15%<br>此外，在柬埔寨、吉尔吉斯斯坦、印度尼西亚、新加坡、韩国、塔吉克斯坦、泰国和乌兹别克斯坦销售产品和服务的当地开发者的收益将在一月底前相应增加。</p>
<p>Apple 在计算抽成之前会根据您提供的税务类别信息估算并移除相关税费。《付费 App 协议》的附录 B 亦将更新以反映此调整。</p>
<p>以上调整生效后，在“我的 App”中“价格与销售范围”部分会随即更新。一如既往，您可以随时在 App Store Connect 中更改您的 App 和 App 内购买项目的价格 (包括自动续期订阅)。如果您有提供订阅项目，您可以选择为现有订阅者保留当前价格。</p>
<p>正如我们此前所宣布，从 2023 年春季起，App 和 App 内购买项目的定价功能升级将带来 700 个新增的价格点；我们还将提供针对全球不同地区更加灵活的价格设定，您将能够不受全球均衡价格的影响，自由管理外币汇率变化。</p>
<h3 id="Ask-Apple-Q-amp-A-和调查表"><a href="#Ask-Apple-Q-amp-A-和调查表" class="headerlink" title="Ask Apple Q&amp;A 和调查表"></a>Ask Apple Q&amp;A 和调查表</h3><p><img src="https://devimages-cdn.apple.com/wwdc-services/articles/images/5A13BEF0-31D6-466B-B88B-8484635BEA2A/2048.jpeg" alt=""></p>
<p>感谢大家参与 10 月、11 月和 12 月举办的三场精彩的 Ask Apple 活动周。Ask Apple 参与者仍可以根据需要访问并查阅 Slack 中的 Q&amp;A。</p>
<p>我们非常希望获得您的反馈，如果您尚未与我们分享您的 Q&amp;A 体验，恳请完成我们的简短调查表。只需几分钟时间即可完成，并且您的回答将被匿名处理。</p>
<p>我们期待不久之后能再次与您沟通交流。</p>
<h2 id="提案"><a href="#提案" class="headerlink" title="提案"></a>提案</h2><h3 id="通过审查的提案"><a href="#通过审查的提案" class="headerlink" title="通过审查的提案"></a>通过审查的提案</h3><p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0384-importing-forward-declared-objc-interfaces-and-protocols.md" title="SE-0384" target="_blank" rel="noopener">SE-0384</a> <strong>导入已声明的 Objective-C 接口和协议</strong> 提案通过审查。该提案已在 <strong>二十一期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md" title="SE-0383" target="_blank" rel="noopener">SE-0383</a> <strong>弃用 @UIApplicationMain 和 @NSApplicationMain</strong> 提案通过审查。该提案已在 <strong>二十一期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0381-task-group-discard-results.md" title="SE-0381" target="_blank" rel="noopener">SE-0381</a> <strong>DiscardingTaskGroups</strong> 提案通过审查。该提案已在 <strong>二十期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0380-if-switch-expressions.md" title="SE-0380" target="_blank" rel="noopener">SE-0380</a> <strong>if 和 switch 表达式</strong> 提案通过审查。该提案已在 <strong>十九期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0378-package-registry-auth.md" title="SE-0378" target="_blank" rel="noopener">SE-0378</a> <strong>Package 注册表认证</strong> 提案通过审查。该提案已在 <strong>十八期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0377-parameter-ownership-modifiers.md" title="SE-0377" target="_blank" rel="noopener">SE-0377</a> <strong>提出了新的 <code>borrow</code> 和 <code>take</code> 参数修饰符</strong> 提案通过审查。该提案已在 <strong>十六期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<h3 id="驳回的提案"><a href="#驳回的提案" class="headerlink" title="驳回的提案"></a>驳回的提案</h3><p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0382-expression-macros.md" title="SE-0382" target="_blank" rel="noopener">SE-0382</a> <strong>Expression Macros</strong> 提案被驳回。该提案已在 <strong>二十期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0379-opt-in-reflection-metadata.md" title="SE-0379" target="_blank" rel="noopener">SE-0379</a> <strong>Swift 选择加入 Reflection 元数据</strong> 提案被驳回。该提案已在 <strong>十九期周报</strong> 正在审查的提案模块做了详细介绍。</p>
<h3 id="正在审查的提案"><a href="#正在审查的提案" class="headerlink" title="正在审查的提案"></a>正在审查的提案</h3><p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md" title="SE-0387" target="_blank" rel="noopener">SE-0387</a> <strong>交叉编译项目</strong> 提案正在审查。</p>
<p><code>Cross-compilation</code> 是一个常见的开发用例。该提案的作者知道已建立的“构建/主机/目标平台”命名惯例，但认为“目标”在构建系统命名中已经具有不同的含义。此外，“平台”本身的定义相当松散。为了避免可能的混淆，我们在这个建议中使用“构建时三元组”和“运行时三元组”术语。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0386-package-access-modifier.md" title="SE-0386" target="_blank" rel="noopener">SE-0386</a> <strong>新的访问修饰符:package</strong> 提案正在审查。</p>
<p>该提案引入了 <code>package</code> 作为一个新的访问修饰符。目前，要访问另一个模块中的符号，该符号需要声明为 <code>public</code>。但是，<code>public</code> 符号允许从任何模块访问它，无论是在包内还是从包外，有时候这样做不能满足需求。需要一个新的访问修饰符来更好地控制此类符号的可见范围。</p>
<p><a href="https://github.com/apple/swift-evolution/blob/main/proposals/0385-custom-reflection-metadata.md" title="SE-0385" target="_blank" rel="noopener">SE-0385</a> <strong>自定义反射元数据</strong> 提案正在审查。</p>
<p>该提案引入了使用自定义属性将库定义的反射元数据附加到声明中的功能，然后库可以查询这些元数据，以便于将客户端代码选择到库功能中。</p>
<h2 id="Swift论坛"><a href="#Swift论坛" class="headerlink" title="Swift论坛"></a>Swift论坛</h2><p>1) 讨论<a href="https://forums.swift.org/t/how-to-set-static-variable-that-requires-async-initialization/62661" title="如何设置需要异步初始化的静态变量" target="_blank" rel="noopener">如何设置需要异步初始化的静态变量</a></p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">@globalActor <span class="keyword">public</span> actor <span class="type">ImageDatabase</span>&#123;</span><br><span class="line">    </span><br><span class="line">    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">var</span> shared: <span class="type">ImageDatabase</span> = <span class="type">ImageDatabase</span>() </span><br><span class="line">    <span class="comment">// 'async' call cannot occur in a global variable initializer</span></span><br><span class="line">    </span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">var</span> transport : <span class="type">ImageTransportLayer</span></span><br><span class="line">    </span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">init</span>() async &#123;</span><br><span class="line">           <span class="keyword">self</span>.transport = await <span class="type">ImageTransportLayer</span>()</span><br><span class="line">    &#125;    </span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">@<span class="type">ImageDatabase</span> <span class="class"><span class="keyword">class</span> <span class="title">ImageTransportLayer</span> </span>&#123; &#125; <span class="comment">// CRUD</span></span><br></pre></td></tr></table></figure>
<p><strong>解决方法：</strong> 可以稍后在应用程序启动序列中手动初始化 <code>ImageTransportLayer</code></p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">@globalActor <span class="keyword">public</span> actor <span class="type">ImageDatabase</span> &#123;</span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">init</span>() &#123;&#125;</span><br><span class="line">    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">var</span> shared: <span class="type">ImageDatabase</span> = <span class="type">ImageDatabase</span>()</span><br><span class="line"></span><br><span class="line">    <span class="keyword">private</span> <span class="keyword">var</span> transport: <span class="type">ImageTransportLayer</span>?</span><br><span class="line">    <span class="keyword">public</span> <span class="function"><span class="keyword">func</span> <span class="title">initTransport</span><span class="params">()</span></span> async &#123;</span><br><span class="line">        transport = await <span class="type">ImageTransportLayer</span>()</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">@<span class="type">ImageDatabase</span> <span class="class"><span class="keyword">class</span> <span class="title">ImageTransportLayer</span> </span>&#123;&#125; <span class="comment">// CRUD</span></span><br><span class="line"></span><br><span class="line"><span class="type">Task</span> &#123;</span><br><span class="line">    await <span class="type">ImageDatabase</span>.shared.initTransport()</span><br><span class="line"></span><br><span class="line">    <span class="comment">// Continue using ImageDatabase.shared</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>2) 讨论<a href="https://forums.swift.org/t/swift-5-7-on-macos-catalina-and-a-toolchain-for-macos/62656" title="macOS Catalina 上的 Swift 5.7 和适用于 macOS 的工具链" target="_blank" rel="noopener"> macOS Catalina 上的 Swift 5.7 和适用于 macOS 的工具链</a></p>
<p>3) 发布<a href="https://forums.swift.org/t/vscode-swift-v1-0-0/62668" title="VSCode Swift v1.0.0" target="_blank" rel="noopener"> VSCode Swift v1.0.0</a></p>
<p>Swift Visual Studio Code 扩展的 1.0 版已经发布。 它不再处于预览状态。<br>此版本对 v0.10.0 进行了一些小的添加，并修复了一些错误。 更新日志链接：<a href="https://marketplace.visualstudio.com/items/sswg.swift-lang/changelog" target="_blank" rel="noopener">https://marketplace.visualstudio.com/items/sswg.swift-lang/changelog</a></p>
<p>4) 讨论<a href="https://forums.swift.org/t/asyncsequences-and-cooperative-task-cancellation/62657" title="AsyncSequences 和 cooperative 任务取消" target="_blank" rel="noopener"> AsyncSequences 和 cooperative 任务取消</a></p>
<p>5) 讨论<a href="https://forums.swift.org/t/property-wrapper-on-a-functions-signature/62660" title="函数签名的属性包装器" target="_blank" rel="noopener">函数签名的属性包装器</a></p>
<p>6) 提问<a href="https://forums.swift.org/t/integrating-a-function-into-a-struct/62634" title="将函数集成到结构中" target="_blank" rel="noopener">将函数集成到结构中</a></p>
<p>目标是有一个接受字符串的字段，它下面的文本将打印一条消息，其中包含输入的单词和它包含的字母数。</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> SwiftUI</span><br><span class="line"></span><br><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">Test1</span>: <span class="title">View</span> </span>&#123;</span><br><span class="line"></span><br><span class="line">  @<span class="type">State</span> <span class="keyword">private</span> <span class="keyword">var</span> newWord = <span class="string">""</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> body: some <span class="type">View</span> &#123;</span><br><span class="line">      <span class="type">VStack</span> &#123;</span><br><span class="line">          <span class="type">TextField</span>(<span class="string">"Enter a word"</span>, text: $newWord)</span><br><span class="line">              .frame(height: <span class="number">50</span>)</span><br><span class="line">              .cornerRadius(<span class="number">10</span>)</span><br><span class="line">              .background(.gray.opacity(<span class="number">0.1</span>))</span><br><span class="line">              .padding(.horizontal, <span class="number">20</span>)</span><br><span class="line"></span><br><span class="line">          <span class="comment">//Text(countLetters(myWord: newWord))</span></span><br><span class="line">          <span class="type">Text</span>(myMessage)</span><br><span class="line">      &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">func</span> <span class="title">countLetters</span><span class="params">(myWord: String)</span></span> -&gt; (<span class="type">String</span>, <span class="type">Int</span>) &#123;</span><br><span class="line">  <span class="keyword">var</span> myCounter = <span class="number">0</span></span><br><span class="line">  <span class="keyword">var</span> characters = <span class="string">""</span></span><br><span class="line">  <span class="keyword">for</span> letter <span class="keyword">in</span> myWord &#123;</span><br><span class="line">      characters += <span class="string">"<span class="subst">\(letter)</span>"</span></span><br><span class="line">      myCounter += <span class="number">1</span></span><br><span class="line">  &#125;</span><br><span class="line">  <span class="keyword">return</span> (characters, myCounter)</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">var</span> myWordCount = countLetters(myWord: <span class="string">"Gregory"</span>)</span><br><span class="line"><span class="keyword">var</span> myMessage = <span class="string">"There are <span class="subst">\(myWordCount)</span> letters in the"</span></span><br></pre></td></tr></table></figure>
<p><strong>解决：</strong> 字符串有一个 <code>.count</code> 属性，可以直接使用：</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">struct</span> <span class="title">ContentView</span>: <span class="title">View</span> </span>&#123;</span><br><span class="line"></span><br><span class="line">  @<span class="type">State</span> <span class="keyword">var</span> text = <span class="string">""</span></span><br><span class="line"></span><br><span class="line">  <span class="keyword">var</span> body: some <span class="type">View</span> &#123;</span><br><span class="line">      <span class="type">VStack</span> &#123;</span><br><span class="line">          <span class="type">TextField</span>(<span class="string">"Enter a word"</span>, text: $text)</span><br><span class="line">          <span class="type">Text</span>(<span class="string">"There are <span class="subst">\(text.<span class="built_in">count</span>)</span> letters in your word"</span>)</span><br><span class="line">      &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>7) 发布<a href="https://forums.swift.org/t/released-asyncobjects-2-0/62664" title="AsyncObjects 2.0" target="_blank" rel="noopener"> AsyncObjects 2.0</a></p>
<p>8) 提议<a href="https://forums.swift.org/t/pitch-add-keypaths-boolean-custom-operators/62626" title="添加 KeyPaths Boolean自定义运算符" target="_blank" rel="noopener">添加 KeyPaths Boolean 自定义运算符</a></p>
<p><strong>内容大概：</strong></p>
<p>在<a href="https://github.com/apple/swift-evolution/blob/main/proposals/0249-key-path-literal-function-expressions.md" target="_blank" rel="noopener">SE-0249</a> 引入了在允许 (Root) -&gt; Value 函数的任何地方使用关键路径表达式 \Root.value 的能力。</p>
<p>现在在各个项目中得到了广泛的使用。<br>在这里试图提议的是为关键路径添加一些新的运算符，以便在尝试对其应用任何逻辑时更容易使用它。</p>
<p>这里有几个例子：</p>
<p>假设我们想过滤字典并获取所有为真的值。<br>我们现在可以通过以下方式使用关键路径轻松完成此操作：</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> dict = [<span class="string">"a"</span>: <span class="literal">true</span>, <span class="string">"b"</span>: <span class="literal">true</span>, <span class="string">"c"</span>: <span class="literal">false</span>]</span><br><span class="line"><span class="keyword">let</span> filtered = dict.<span class="built_in">filter</span>(\.value) <span class="comment">// returns ["a": true, "b": true]</span></span><br></pre></td></tr></table></figure>
<p>但是如果我们想过滤字典中的错误值怎么办？那么现在我们不能使用关键路径，我们需要依赖闭包：</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> filtered = dict.<span class="built_in">filter</span> &#123; !$<span class="number">0</span>.value &#125; <span class="comment">// returns ["c": false]</span></span><br></pre></td></tr></table></figure>
<p>这里的建议是添加以下运算符：</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">prefix</span> <span class="function"><span class="keyword">func</span> !&lt;V&gt;<span class="params">(keyPath: KeyPath&lt;V, Bool&gt;)</span></span> -&gt; (<span class="type">V</span>) -&gt; <span class="type">Bool</span> &#123;</span><br><span class="line">    &#123; !$<span class="number">0</span>[keyPath: keyPath]&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">func</span> ==&lt;T, V: Equatable&gt;<span class="params">(lhs: KeyPath&lt;T, V&gt;, rhs: V)</span></span> -&gt; (<span class="type">T</span>) -&gt; <span class="type">Bool</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> &#123; $<span class="number">0</span>[keyPath: lhs] == rhs &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">func</span> !=&lt;T, V: Equatable&gt;<span class="params">(lhs: KeyPath&lt;T, V&gt;, rhs: V)</span></span> -&gt; (<span class="type">T</span>) -&gt; <span class="type">Bool</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> &#123; $<span class="number">0</span>[keyPath: lhs] != rhs &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这将使我们能够按如下方式使用关键路径：</p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> dict = [<span class="string">"a"</span>: <span class="literal">true</span>, <span class="string">"b"</span>: <span class="literal">true</span>, <span class="string">"c"</span>: <span class="literal">false</span>]</span><br><span class="line"></span><br><span class="line"><span class="keyword">let</span> filtered = dict.<span class="built_in">filter</span>(!\.value)</span><br><span class="line"></span><br><span class="line"><span class="keyword">let</span> filtered2 = dict.<span class="built_in">filter</span>(\.value == <span class="literal">false</span>)</span><br></pre></td></tr></table></figure>
<h2 id="关于我们"><a href="#关于我们" class="headerlink" title="关于我们"></a>关于我们</h2><p><strong>Swift社区</strong>是由 Swift 爱好者共同维护的公益组织，我们在国内以微信公众号的运营为主，我们会分享以 <strong>Swift实战</strong>、<strong>SwiftUl</strong>、<strong>Swift基础</strong>为核心的技术内容，也整理收集优秀的学习资料。</p>
<p>欢迎关注公众号:Swift社区，后台点击进群，可以进入我们社区的交流讨论群。希望我们Swift社区是大家在网络空间中的另一份共同的归属。</p>
<p><img width="500" alt="Swift社区" src="https://user-images.githubusercontent.com/24238160/132703149-34121c6c-fd18-491c-a697-58a0fabf3060.png"></p>
<p>特别感谢 Swift社区 编辑部的每一位编辑，感谢大家的辛苦付出，为 Swift社区 提供优质内容，为 Swift 语言的发展贡献自己的力量。</p>

      
    </div>
    
    
    
    

    
      <div>
        <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>
    
</div>

      </div>
    


    
      <div>
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/Swift-周报-第二十二期/">Swift 周报 第二十二期</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 Swift社区 的个人博客">Swift社区</a></p>
  <p><span>发布时间:</span>2023年07月04日 - 15:07</p>
  <p><span>最后更新:</span>2023年07月04日 - 15:07</p>
  <p><span>原始链接:</span><a href="/Swift-周报-第二十二期/" title="Swift 周报 第二十二期">https://fanbaoying.github.io/Swift-周报-第二十二期/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://fanbaoying.github.io/Swift-周报-第二十二期/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
      $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
        });
    });  
</script>

      </div>
    


    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechat.png" alt="Swift社区 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.png" alt="Swift社区 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Swift/" rel="tag"><i class="fa fa-tag"></i> Swift</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/Swift-周报-第二十一期/" rel="next" title="Swift 周报 第二十一期">
                <i class="fa fa-chevron-left"></i> Swift 周报 第二十一期
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/Swift-周报-第二十三期/" rel="prev" title="Swift 周报 第二十三期">
                Swift 周报 第二十三期 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
        <!-- JiaThis Button BEGIN -->
<div class="jiathis_style">
<span class="jiathis_txt">分享到：</span>
<a class="jiathis_button_fav">收藏夹</a>
<a class="jiathis_button_copy">复制网址</a>
<a class="jiathis_button_email">邮件</a>
<a class="jiathis_button_weixin">微信</a>
<a class="jiathis_button_qzone">QQ空间</a>
<a class="jiathis_button_tqq">腾讯微博</a>
<a class="jiathis_button_douban">豆瓣</a>
<a class="jiathis_button_share">一键分享</a>

<a href="http://www.jiathis.com/share?uid=2140465" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" >
var jiathis_config={
  data_track_clickback:true,
  summary:"",
  shortUrl:false,
  hideMore:false
}
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=" charset="utf-8"></script>
<!-- JiaThis Button END -->
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="https://avatars.githubusercontent.com/u/84354365?v=4"
                alt="Swift社区" />
            
              <p class="site-author-name" itemprop="name">Swift社区</p>
              <p class="site-description motion-element" itemprop="description">我们的使命是做一个最专业最权威的 Swift 中文社区，我们的愿景是希望更多的人学习和使用Swift。我们会分享以 Swift 实战、SwiftUI、Swift 基础为核心的技术干货，不忘初心，牢记使命。</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">187</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">19</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">11</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://blog.csdn.net/qq_36478920" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>CSDN</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://juejin.im/user/5a30d987f265da430d580126" target="_blank" title="掘金">
                      
                        <i class="fa fa-fw fa-spinner"></i>掘金</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/fanbaoying" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.zhihu.com/people/swift-community" target="_blank" title="知乎">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>知乎</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/u/7711465033" target="_blank" title="微博">
                      
                        <i class="fa fa-fw fa-weibo"></i>微博</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://mp.weixin.qq.com/mp/appmsgalbum?__biz=MzAxNzgzNTgwMw==&action=getalbum&album_id=2024314764775981057" target="_blank" title="公众号">
                      
                        <i class="fa fa-fw fa-heartbeat"></i>公众号</a>
                  </span>
                
            </div>
          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/SwiftWeekly" title="SwiftWeekly" target="_blank">SwiftWeekly</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/article-ios" title="Article-ios" target="_blank">Article-ios</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://github.com/SwiftCommunityRes/SwiftUI-Book" title="SwiftUI-Book" target="_blank">SwiftUI-Book</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#前言"><span class="nav-number">1.</span> <span class="nav-text">前言</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#新闻和社区"><span class="nav-number">2.</span> <span class="nav-text">新闻和社区</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#因-iPhone-销量下降，苹果利润-2016-年以来首次低于预期"><span class="nav-number">2.1.</span> <span class="nav-text">因 iPhone 销量下降，苹果利润 2016 年以来首次低于预期</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#App-和-App-内购买项目即将实行税率和价格调整"><span class="nav-number">2.2.</span> <span class="nav-text">App 和 App 内购买项目即将实行税率和价格调整</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Ask-Apple-Q-amp-A-和调查表"><span class="nav-number">2.3.</span> <span class="nav-text">Ask Apple Q&amp;A 和调查表</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#提案"><span class="nav-number">3.</span> <span class="nav-text">提案</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#通过审查的提案"><span class="nav-number">3.1.</span> <span class="nav-text">通过审查的提案</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#驳回的提案"><span class="nav-number">3.2.</span> <span class="nav-text">驳回的提案</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#正在审查的提案"><span class="nav-number">3.3.</span> <span class="nav-text">正在审查的提案</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Swift论坛"><span class="nav-number">4.</span> <span class="nav-text">Swift论坛</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#关于我们"><span class="nav-number">5.</span> <span class="nav-text">关于我们</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Swift社区</span>

  
</div>

<!-- 
<div class="powered-by">
  <i class="fa fa-user-md">
  </i>
  <span id="busuanzi_container_site_uv">
    已有<span id="busuanzi_value_site_uv"></span>人来访
  </span>

</div>


  <span class="post-meta-divider">|</span>


<div class="powered-by">
  <i class="fa fa-eye"></i>
  <span id="busuanzi_container_site_pv">
      访问量<span id="busuanzi_value_site_pv"></span>次
  </span>
</div>



  <span class="post-meta-divider">|</span>


-->

<div class="theme-info">
  <i class="fa fa-pencil"></i>
  <span class="post-count">博客全站共361.6k字</span>
</div>


<!-- 
  <span class="post-meta-divider">|</span>



  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>



-->

        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
